import cv2 as cv
import numpy as np
from matplotlib import pyplot as plt

img  = cv.imread('left06.jpg', 0)

fast = cv.FastFeatureDetector_create()

keypoints = fast.detect(img, None)
imgs = cv.drawKeypoints(img, keypoints,outImage=img, color=(0,0,255))

print("Threshold:", fast.getThreshold())

print("nonmaxSuppression:", fast.getNonmaxSuppression())

print("neighborhood:", fast.getType())

print("Total keypoints with nonmaxSuppression:",len(keypoints))

cv.imwrite('fast_desk.png', imgs)
cv.imshow('fast',imgs)

if cv.waitKey(0) & 0xff == ord("q"):
    cv.destroyAllWindows()


